//
//  HomeBannerTableCell.m
//  DanaKreditLoan
//
//  Created by ZhengChengFeng on 2024/10/19.
//

#import "HomeBannerTableCell.h"

@implementation HomeBannerTableCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.backgroundColor = [UIColor clearColor];
        
        UIImage *img = [UIImage imageNamed:@"icon_home8"];
        
        self.iconV = [[UIImageView alloc] initWithFrame:CGRectMake(15, 0, kScreenWidth - 30, DimensionBaseIphone6(img.size.height))];
        [self.contentView addSubview:self.iconV];
        self.iconV.image = img;
        
        self.bannerView = [[HomeBannerView alloc] initWithFrame:CGRectMake(15, DimensionBaseIphone6(46), self.iconV.frame.size.width - 30, self.iconV.frame.size.height - DimensionBaseIphone6(18) - DimensionBaseIphone6(46))];
        self.bannerView.backgroundColor = [UIColor clearColor];
        [self.iconV addSubview:self.bannerView];

    }
    return self;
}

- (void)reloadData:(NSArray *)dataSource{
    self.bannerView.bannerList = dataSource;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
